<?php
/**
 *	Data Model of Location Users.
 *	@package		mv2.model
 *	@extends		Framework_Krypton_Core_Model
 *	@author			Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@since			13.03.2007
 *	@version		0.1
 */
/**
 *	Data Model of Location Users.
 *	@package		mv2.model
 *	@extends		Framework_Krypton_Core_Model
 *	@author			Christian Würker <Christian.Wuerker@CeuS-Media.de>
 *	@since			13.03.2007
 *	@version		0.1
 */
/*
DROP TABLE IF EXISTS `mv2_location_users`;
CREATE TABLE `mv2_location_users` (
  `location_user_id` int(11) unsigned NOT NULL auto_increment,
  `location_id` int(11) unsigned NOT NULL,
  `user_id` int(11) unsigned NOT NULL,
  `leader` tinyint(1) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY  (`location_user_id`),
  KEY `location_id` (`location_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
*/
class Model_LocationUser extends Framework_Krypton_Core_Model
{
	/**
	 *	Constructor.
	 *	@access		public
	 *	@param		int		location_user_id	ID of Location User
	 *	@return		void
	 *	@author		Christian Würker <Christian.Wuerker@CeuS-Media.de>
	 *	@since		15.10.2006
	 *	@version	0.1
	 */
	function __construct( $location_user_id = false )
	{
		$tablename	= "location_users";
		$fields	= array (
			"location_user_id",
			"location_id",
			"user_id",
			"leader",
			);
		$primary_key	= "location_user_id";
		$indices		= array( 'location_id', 'user_id', 'leader' );
		parent::__construct( $tablename, $fields, $primary_key, $$primary_key );
		$this->setIndices( $indices );
	}
}
?>
